<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EditDefinitionFieldBaseProperties.ascx.cs" Inherits="UCommerce.Web.UI.Settings.Definitions.EditDefinitionFieldBaseProperties" %>
<%@ Register tagPrefix="commerce" tagName="ValidationSummary" src="../../Controls/ValidationSummaryDisplay.ascx" %>

<commerce:ValidationSummary ID="ValidationSummary1" runat="server" />

<div class="propertyPane">
    <div class="propertyItem">
        <div class="propertyItemHeader">
            <asp:Localize ID="Localize1" runat="server" meta:resourceKey="Name" />
        </div>
        <div class="propertyItemContent">
            <asp:TextBox runat="server" ID="NameTextBox" Text="<%# View.DefinitionField.Name %>" CssClass="mediumWidth" />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="NameTextBox" Text="*" ErrorMessage='<%# GetLocalResourceObject("Name.Text") %>' CssClass="validator" Display="Dynamic" />
            <asp:CustomValidator ID="CustomValidator1" runat="server" Text="*" ErrorMessage='<%# GetLocalResourceObject("Name.Text") %>' CssClass="validator" OnServerValidate="NameValidator_ServerValidate" Display="Dynamic" />
            <asp:RegularExpressionValidator meta:ResourceKey="NameValidator" ID="NameValidator" ControlToValidate="NameTextBox" ValidationExpression="^(?!(xml|[_\d\W]))[^ \s\W]+$" ErrorMessage='<%# GetLocalResourceObject("Name.Text") %>' Text="Name can contain only letters and numbers(*)." Display="Dynamic" runat="server" />
        </div>
    </div>

    <div class="propertyItem">
        <div class="propertyItemHeader">
            <asp:Localize ID="Localize2" runat="server" meta:resourceKey="DataType" />
        </div>
        <div class="propertyItemContent">
            <asp:DropDownList runat="server" ID="DataTypeDropDown" DataSource="<%# View.DataTypes %>" DataValueField="DataTypeId" DataTextField="TypeName" OnDataBound="DataTypeDropDown_DataBound" CssClass="mediumWidth" />
        </div>
    </div>

    <asp:PlaceHolder runat="server" id="PropertyPanel"></asp:PlaceHolder>

    <div class="propertyPaneFooter"></div>

</div>
